﻿@model dynamic
@{
    ViewBag.Title = "Administration";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Administration</h2>
@Html.TextBox("txtCardSearchBar", null, new {placeholder = "Card Name", autocomplete = "off"})
<script type="text/javascript">

    $().ready(function() {
        var $txtCardSearchBar = $('#txtCardSearchBar');

        $txtCardSearchBar.typeahead({
            source: function(query, process) {
                var url = "@Url.Action("Autocomplete", "Administration")";
                $.get(url, { query: query }, function(data) {
                    process(data);
                });

            },
            minLength: 1
        });
    });

</script>